<template>
  <div class="screentop">
    <img class="logo" :src="logo" />
    <div class="title">{{ systemName }}</div>
    <div class="d-flex list">
      <div>顶部区域一</div>
      <div>顶部区域二</div>
      <div>顶部区域三</div>
      <div>顶部区域四</div>
    </div>
    <div class="info">
      <div class="icon">pic</div>
      <div>
        <div>{{ userName }}</div>
        <div>欢迎登录！</div>
      </div>
      <el-button type="text" icon="el-icon-switch-button" @click="logout"> 退出</el-button>
    </div>
  </div>
</template>

<script>
import { querySystemMenuList, querySystemBodyLayout } from '@/api/layout'
export default {
  name: 'test',
  data () {
    return {
      logo: "",
      systemName: "",
      userName: "",
    }
  },
  created () {
    this.init()
  },
  methods: {
    async init () {
      this.systemName = sessionStorage.getItem("systemName");
      this.userName = sessionStorage.getItem("userName");
    },

    logout() {
      let systemRefCode = sessionStorage.getItem("systemRefCode");
      this.$store.dispatch("permission/logout").then(() => {
        this.$router.push(`/login?systemRefCode=${systemRefCode}`)
      })
    },
  }
}
</script>
<style lang="scss" scoped>
</style>
